<template>
    <div class="hello">
    跳转中,请等待......
    </div>
</template>

<script>
    export default {
      data() {
        return {
          token:''
        }
      },
      components: {},
      methods: {
        wxLogin(token){
          this.$bw.addStorage({name:"userInfo",info:{AccessToken:token.split(' ')[1]}})

          this.$service('/api/WeChat/GetStudentDetail', 'get', {}).then((response) => {

            var userInfos = {
              info: {
                AccessToken:token.split(' ')[1]
              },
              name: "userInfo"
            }
            userInfos.info = response.Data;
            userInfos.info.AccessToken =token.split(' ')[1];
//            console.log(userInfos)
            this.$bw.addStorage(userInfos);
            window.location.href='http://manage.cdtx.org:81/dist/';
          }).catch(err => {

          })
        }
      },
      mounted() {
//        var token = this.$route.query.token;
        var token = this.$bw.getUrlInfo('token')
        this.wxLogin(token)

      }
    }
</script>


